import Vue from "vue";
import { Header } from "mint-ui";
Vue.component(Header.name, Header);
import "mint-ui/lib/style.css";

import './lib/mui/css/mui.css';
import './lib/mui/css/icons-extra.css';


//导入路由
import VueRouter from "vue-router";
Vue.use(VueRouter);

import { Swipe, SwipeItem, Button,Lazyload} from 'mint-ui';
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Button.name, Button);

Vue.use(Lazyload)

//导入时间插件  npm i moment -D
import moment from 'moment';
Vue.filter("dateFormat",function(dateStr,pattern="YYYY-MM-DD HH:mm:ss"){
    return moment(dateStr).format(pattern);
})

//导入vue-resource
import VueResource from 'vue-resource';
Vue.use(VueResource);

import VuePreview from 'vue-preview';
Vue.use(VuePreview)
//设置请求数据的根路径
Vue.http.options.root = "./localData"

import vr from "./router.js";

import app from "./App.vue";


new Vue({
    el:"#app",
    render: h => h(app),
    router: vr
})